home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Clinical Endocrinology
/
Clinical Endocrinology.iso
/
pc
/
00000000
/
14000000
/
14020000
/
shared.dir
/
00955_Script_doCapture
< prev
next >
Wrap
Text File
|
1995-11-17
|
2KB
|
93 lines
-- Code for Capturing Screen
on DoCapture
global hardDisk
if voidP(slidesLocation) = true then
set slidesLocation = "Endocrinology:Desktop Folder:"
end if
-- Open Capture XLib file
if the machineType <> 256 then
openXLib hardDisk &"CaptureXObj"
else
openxlib hardDisk & "Capture.dll"
end if
-- Define Rectangle boundaries for capture
set top = the top of sprite 5
set left = the left of sprite 5
set bottom = the bottom of sprite 5
set right = the right of sprite 5
-- Create instance of capture object
set grab = Capture(mNew, top, left, bottom, right)
-- Prompt user for filename
if the machineType <> 256 then
-- Mac filenames
set default = "Capture.Pict"
else
set default = "CAPTURE.BMP"
end if
set file = FileIO(mNew, "?write", default)
if ObjectP(file) then
set captureFile = file(mFilename)
file(mDelete)
else
set captureFile = ""
-- alert "FileIO Error:"&&String(file)
end if
-- Hide all irrelevant graphics first
repeat with i = 6 to 35
set the visible of sprite i = FALSE
end repeat
repeat with i = 38 to 48
set the visible of sprite i = FALSE
end repeat
updateStage -- Refresh screen under dialog, erase button
-- Capture to specified file
if captureFile <> "" then
grab(mSave, captureFile)
end if
-- Restore graphics
repeat with i = 6 to 35
set the visible of sprite i = TRUE
end repeat
repeat with i = 38 to 48
set the visible of sprite i = TRUE
end repeat
updateStage -- Refresh button
grab(mDispose)
-- Close Capture XLib file
if the machineType <> 256 then
closexlib hardDisk &"CaptureXObj"
else
closexlib hardDisk & "Capture.dll"
end if
end DoCapture
-----------------------------------------------------------
-- Handler to open MIAW for user input for slide
-- capture.
on openCapturePrompt
global hardDisk
put hardDisk & "Slideslog.dir" into childWindow
set the title of window childWindow to "Save Slide"
open window childWindow
end openCapturePrompt